import React from 'react';

interface IPurchaseSupplierStatisticsContextAPI {
  styleFixCls: string;
  countStepType: string;
  changeStepType: (res: string) => void;
  statisticsData: any;
  tableDataPagination: Record<string, any>;
  reloadRequest: (res: Record<string, any>) => void;
  curRes: Record<string, any>;
}

/** 默认上下文 */
const INIT_PURCHASESUPPLIER_VALUE: IPurchaseSupplierStatisticsContextAPI = {
  styleFixCls: '',
  countStepType: '',
  changeStepType: () => {},
  statisticsData: [],
  tableDataPagination: {},
  reloadRequest: () => {},
  curRes: {},
};

const PurchaseSupplierStatisticsContext = React.createContext<IPurchaseSupplierStatisticsContextAPI>(INIT_PURCHASESUPPLIER_VALUE);

export { PurchaseSupplierStatisticsContext };
